package com.aaa.project.commdetail.controller;

import com.aaa.framework.aspectj.lang.annotation.Anonymous;
import com.aaa.project.commdetail.service.DailyCommDetailService;
import com.aaa.project.commdetail.service.TempTimeStatOnlineNew3UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author baibin
 * @version 1.0
 * @date 2025/4/22 17:22
 * @description DailyCommDetailController
 */
@RestController
public class DailyCommDetailController {

    @Resource
    private DailyCommDetailService dailyCommDetailService;
    @Resource
    private TempTimeStatOnlineNew3UserService tempTimeStatOnlineNew3UserService;

    @GetMapping("/comm/detail")
    @Anonymous
    public void commDetail(@RequestParam("userCityNo") String userCityNo, @RequestParam("startTime") String startTime,
                           @RequestParam("endTime") String endTime) {
        dailyCommDetailService.list(userCityNo, startTime, endTime);
    }

    @GetMapping("/comm/detail/v2")
    @Anonymous
    public void commDetailV2(@RequestParam("userCityNo") String userCityNo, @RequestParam("startTime") String startTime,
                             @RequestParam("endTime") String endTime) {
        dailyCommDetailService.listV2(userCityNo, startTime, endTime);
    }

    @GetMapping("/comm/detail/v3")
    @Anonymous
    public void commDetailV3(@RequestParam("userCityNo") String userCityNo, @RequestParam("startTime") String startTime,
                             @RequestParam("endTime") String endTime) {
        dailyCommDetailService.listV3(userCityNo, startTime, endTime);
    }

    @GetMapping("/new3/user/v1")
    @Anonymous
    public void new3UserV1() {
        tempTimeStatOnlineNew3UserService.query();
    }
}
